#!/usr/bin/env python
# encoding: utf-8
# @author: Lin Han
# @contact: voldemort22@126.com
# @file: parameterModel.py
# @time: 2021/3/22 20:04
# @desc:
from datetime import datetime
from typing import Optional, List

from pydantic import BaseModel


class Base(BaseModel):
    number: Optional[str]
    isFeature: Optional[str]
    isFlag: Optional[str]
    name: Optional[str]
    time: Optional[datetime]
    desc: Optional[str]
    version: Optional[str]


class PartTag(BaseModel):
    # TODO: 下面的前四个将来都考虑做成枚举类
    standard: str
    category: str
    bigType: str
    smallType: str
    elseTag: List

class InputPartModel(Base):
    PartCatPartAddress: Optional[str]
    PartCatPartMD5: Optional[str]

    Tag: Optional[PartTag]


class InputParameterModel(InputPartModel):
    PartJsonAddress: Optional[str]
    PartJsonMD5: Optional[str]
